<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
session_start();
require '../com.swiss.mooh.service/UserServiceImpl.php';
require '../com.swiss.mooh.dao.impl/UserDaoImpl.php';
require '../com.swiss.mooh.model/User.php';

$dispatcher = new UserDaoImpl();
$userService = new UserService($dispatcher);

$userVO = new User();
$userVO->setUsername($_GET['username']);
$userVO->setPassword($_GET['password']);
$result = $userService->verifyUserByUsernameAndPassword($userVO);
$resultVO = $result->GetObj(0);
if ($result->Size() == 1) {
    echo 200;
} else {
    echo $result;
}
